<div id="box">
    <input type="button" id="post" value="POST请求"/><br/><br/><br/>
    <input type="button" id="login" value="登录"/>
</div>
<script type="text/javascript" src="public/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
    $(function () {
        var data = {
            "sync": 1,
            "token": "7eed517eb91be606d0b566810d61ebbc",
            "apptoken": "d01Pos9C",

            //step1.游戏资源替换
            "raffletype":8,
            "extwayList":'[{"name":"QQ空间","selected":false,"typeid":2},{"name":"微博","selected":false,"typeid":3},{"name":"支付宝","selected":false,"typeid":4}]',

           //step2.设置营销信息
            "criteria": {
                "formitems": [1,15],
                "votingdays": 1,
                "votingnums": 3,
                "allowbaoming": 1,
                "formruledesc": "恭喜您中奖啦~ 请填写下列信息，便于工作人员和您获取联系发放奖品"
            },
            "prizes": [{
                "lot_id": "3",
                "lot_name": "奖品1",
                "lot_count": "1",
                "lot_consume": "0",
                "probability": 100,
                "lot_desc": "奖品1",
                "lot_url": "",
                "lot_type": "0",
                "lot_code_setting": {
                    "firstnum": "1",
                    "lastnum": "10",
                    "num": "1"
                },
                "prizes_link": "",
                "status": "1",
                "wxpay_fund": "0.00",
                "wxpay_refund": "0.00",
                "firstnum": "1",
                "lastnum": "10"
            }],

            //step3.设置项目信息
            "marketinginfo": {
                "isset": "1",
                "type": 4,
                "linkname": "我也要用赢销+免费制作",
                "linkpath": "http://www.beetobees.com/m/index.html?acode=Zh82qEae",
                "imageurl": "adImg.png",
                "imagepath": "http://www.beetobees.com/m/index.html?acode=Zh82qEae",
                "unionname": "游戏化营销专家",
                "unionpath": "http://www.beetobees.com/m/index.html?acode=Zh82qEae",
                "basename": "赢销+技术支持",
                "basepath": "http://www.beetobees.com/m/index.html?acode=Zh82qEae",
                "rule_show": true,
                "qrcodeurl": "adImg.png",
                "redicturl": "resource/assets/about.png",
                "qrcodepath": "qrcode.png",
                "redictpath": "http://www.beetobees.com/m/index.html?acode=Zh82qEae",
                "promotion_isset": "1",
                "promotion_type": "1"
            },
            "shareinfo": {
                "title": "萌宠之星选美大赛",
                "desc": "快来跟我一起参加萌宠之星选美大赛吧~",
                "link": "icon.png",
                "finishdesc": "我正在参加萌宠之星选美大赛，好玩的不得了，速来围观~"
            },
            "offlineinfo": {
                "time": 1499766660,
                "desc": "活动已结束，敬请关注更多精彩！"
            },
            "offlinetime": {
                "date": "2017/07/11",
                "hour": "17",
                "minute": "51"
            }

        };

        //编辑
        $('#post').click(function () {
            $.post('http://m.9tech.cn/edit/save', data,function (res) {
                console.log(res);
            },'json');
        });
        
        //登录
        $('#login').click(function () {
            $.post('http://m.9tech.cn/accounts/login', {username:"18811013356", password:"1234abcd"},function (res) {
                console.log(res);
            },'json');
        });
    });
</script>
<?php echo '';?>